package com.sh.data.engine.application.model.request.integration;

import com.sh.data.engine.common.annotation.crypto.EncryptField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author: mengzheng.mhc
 * @date: 2024/6/11 17:57
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema
public class DataSourceIotDBSaveRequest extends DataSourceSaveRequest {

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @Schema(description = "用户名")
    private String username;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Schema(description = "密码")
    @EncryptField
    private String password;

    /**
     * 连接地址
     */
    @NotNull(message = "连接地址不能为空")
    @Schema(description = "连接地址")
    private String server;
}
